<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Design by Free CSS Templates
http://www.freecsstemplates.org
Released for free under a Creative Commons Attribution 2.5 License
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>AnimeToones</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href='{{STATIC_URL}}css/default.css' rel="stylesheet" type="text/css" />
<script type="text/javascript">

function modificar(url){

  document.getElementById("mienlace").href = url;
  document.getElementById("id_link_principal").value = url;
  $(document).ready(function() {
		$(".oembed").oembed(null, { 
			embedMethod: "append", 
			maxWidth: 500, 
			maxHeight: 400 });
	});
}  

</script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="{{STATIC_URL}}js/jquery.oembed.js"></script>
</head>
<body>
<div id="header">
	<div id="logo">
		<h1><p>Último ingreso: {{ user.last_login }}. </p></h1>
		<h2><span>AnimeToones</span></h2></div>
	<div id="menu">
		<ul>
			<li class="active"></li>
            {% if user.is_authenticated %}
    			<li><a href="/logout/" title="">Salir</a></li>
			{% else %}
			{% endif %}
            <li></li>
			<li></li>
			<li></li>
		</ul>
	</div>
</div>
<div id="wrapper">
	<div id="content">
		<div id="sidebar">
			<div id="support">
				<h2>{% if user.is_authenticated %}
    				<p>Bienvenido, {{ user.username }}. </p>
					<p>Gracias por preferirnos.</p>
    				<p>{% else %} </p>
					<p>Error, recargue la página he ingrese nuevamente.</p>
					{% endif %}
				</h2>
			</div>
			<div id="login" class="boxed">
				<h2 class="title">Menú principal  </h2>
				<div id="menuv">
				  	<li class="active"><a href="/" title="">Inicio</a></li>
					<li><a href="/topten/" title="">Top 5</a></li>
					<li><a href="/todosanime/" title="">Todo el ranking</a></li>
                    <li><a href="/agregarlink/" title="">Agregar Animé</a></li>
				</div>
			</div>
		</div>
		<div id="main">
			<div id="welcome" class="post">
				<h2 class="title">Agregar video Animé!</h2>
				<h3 class="date">&nbsp;</h3>
				<div class="story">
					<p>
					<table width="782" border="1">
						<tr>
							<td width="268" height="284">
								<form action="#">
									<label for="enlace">URL: </label><input type="text" id="enlace">
									<input onclick="modificar(getElementById('enlace').value);" type="button" value="Ver enlace">
								</form>
								<br>
								<form action="" method="post">
									{% csrf_token %}
									{{ form.as_p }}
									<input type="submit" value="Guardar" />
								</form>
							</td>
							<td width="498">
								<div align="center" id="divlink"><a href="http://www.youtube.com/watch?v=eZj_yNhdUPY&feature=fvwrel" class="oembed" id="mienlace"></a>
								</div>
							</td>
						</tr>
					</table>
					</p>
				</div>
			</div>
			<div id="example" class="post">
				<h3 class="date">&nbsp;</h3>
				<div class="story">
				<video controls src="http://devfiles.myopera.com/articles/2642/sintel-trailer.ogv">Tu navegador no soporta HTML5 </video>
				</div>
			</div>
		</div>
	</div>
	<div style="clear: both;">&nbsp;</div>
</div>
<div id="footer">
	<p id="legal">Copyright &copy; 2007 Midnight. All Rights Reserved. Designed by <a href="http://www.freecsstemplates.org">FCT</a>.</p>
	<p id="links"><a href="#">Privacy Policy</a> | <a href="#">Terms of Use</a></p>
</div>
</body>
</html>
